home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / ca29_3.zip / UARTTYPE.CMD < prev    next >
OS/2 REXX Batch file  |  1990-11-13  |  1KB  |  38 lines

  1. ; ----- UARTTYPE: Report the UART type found when opening the comm port
  2. ;
  3. ;    Pgm: R. McGinnis; Chicago; 7/90
  4. ; ---------------------------------------------------------------------
  5. ;
  6. ;    Determine the UART type
  7. ;
  8.    LEGEND " UART report - press any key to continue"
  9.    S0 = "_UART"                 ; Fetch type
  10.    S1 = "No UART detected"      ; Set dft msg
  11.    SWITCH S0
  12.       CASE 0        ; 0 -> not 16550(A) - 8250 or somesuch
  13.            S1 = "8250 UART (no FIFO buffering)"
  14.            ENDCASE
  15.       CASE 1        ; 2 -> 16550
  16.            S1 = "16450 (1, no FIFO buffering)"
  17.            ENDCASE
  18.       CASE 2        ; 2 -> 16550
  19.            S1 = "16450 (2, no FIFO buffering)"
  20.            ENDCASE
  21.       CASE 3        ; 3 -> 16550A
  22.            S1 = "16550(A) (FIFO buffering)"
  23.            ENDCASE
  24.     ENDSWITCH
  25.     N0 = 11            ; Port offset if not 300 baud
  26.     IF STRCMP "_PARM"(0:2) "300" N0 = 10
  27.     S1 = S1*" on "*"_PARM"(N0:14)  ; xxxx,e,7,1,comx
  28. ;
  29. ;    Report it
  30. ;
  31.    WOPEN 9,10,11,70 (default) Exit
  32.    ATSAY 10,12 (default) S1
  33.    ATSAY 11,27 (default) " Press any key to continue "
  34.    KEYGET S1            ; Wait for a keypress
  35. Exit:
  36.    WCLOSE
  37.    EXIT
  38.